package com.huxuesong.prcc.ums.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.huxuesong.prcc.dto.UmsMemberDTO;
import com.huxuesong.prcc.dto.UmsMemberTransferInfoDTO;
import com.huxuesong.prcc.ums.entity.UmsMember;
import com.huxuesong.prcc.ums.entity.UmsMemberTransferInfo;
import com.huxuesong.prcc.util.CommonResult;
import org.springframework.transaction.annotation.Transactional;

import java.math.BigDecimal;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author hxs
 * @since 2019-08-02
 */
public interface IUmsMemberService extends IService<UmsMember> {

        /**
         * 获取当前登录会员
         */
        UmsMember getCurrentMember();
        /**
         * 根据用户名获取会员
         */
        UmsMember getByUsername(String username);

        CommonResult login(String username, String password);

        /**
         * 用户注册
         */
        @Transactional
        CommonResult register(UmsMemberDTO umsMemberDTO);


        /**
         * 生成验证码
         */
        CommonResult generateAuthCode(String phone);

        /**
         * 修改密码
         */
        @Transactional
        CommonResult updatePassword(UmsMemberDTO memberDTO);


        String refreshToken(String token);


        /**
         * 申请coin address
         */
        @Transactional
        public CommonResult createCoinAddress();



    /**
     * 用户申请转账
     */
    @Transactional
    public CommonResult transfer(UmsMemberTransferInfoDTO transferInfoDTO);

    public CommonResult transferDetail(Integer type,Integer pageNum, Integer pageSize);
//
    public CommonResult buyTree(UmsMember member);

    public CommonResult shockTree(UmsMember member);


    public CommonResult canceltransfer(UmsMember member,Integer transferId);

    public CommonResult withdrawprcc(UmsMember member,BigDecimal prcc ,String recvCoinAddress);

    public CommonResult getSysSetting();

    //    List<UmsMember> listAllMember();
//
//    int createMember(UmsMember UmsMember);
//
//    @Transactional
//    int updateMember(Long id, UmsMember UmsMember);
//
//    int deleteMember(Long id);
//
//    int deleteMember(List<Long> ids);
//
//    List<UmsMember> listMember(String keyword, int pageNum, int pageSize);
//
//    UmsMember getMember(Long id);
//
//
//    /**
//     * 根据会员编号获取会员
//     */
    UmsMember getById(Long id);


}
